﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ERP_RORZE_DLL.Product.DAO;
using ERP_RORZE_DLL.Product.database;

namespace ERP_RORZE_PRODUCT.Product.BasicList
{
    public partial class frm_SectionAdd : DevExpress.XtraEditors.XtraForm
    {
        public event EventHandler Reload;
        ClsBasicListDAO clsBasiclistDAO = new ClsBasicListDAO();
        Section b = new Section();

        public frm_SectionAdd()
        {
            InitializeComponent();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            b.SectionID = txtSectionID.Text;
            b.SectionName = txtSectionName.Text;
            clsBasiclistDAO.InsertSection(b);
            Reload(sender, e);
        }
    }
}